The invention relates to a memory device for storing data according to the FIFO principle (first in first out), having a memory, an input counter, an output counter and a comparison unit.
The data are preferably processed as data words with a predetermined number of bit positions. If a data word is written into the memory, the input counter is modified, and is preferably increased by the numeric value "1." In contrast, when a data word is read from the memory, the output counter is modified, e.g. likewise by an increase by the numeric value "1."
The comparison unit, which is connected at the input side with the output of the input counter and with the output of the output counter, compares the counter states of the input counter and the output counter and emits a status signal concerning the presence of data words in the memory.
In known FIFO memories (such as for example in the circuit SN74ACT7806), a complete decoupling of the asynchronous systems accessing the FIFO memory is not achieved. The status signal with the information about the number of data words contained in the FIFO memory is, as a rule, interrogated by the reading system. If the status signal changes during the interrogation as a result of a write access of the writing system, errors can occur in the reading system, because the status signal has what is known as a forbidden state during its interrogation, i.e. a physical state that is not unambiguously defined, to which no binary logical state corresponds.